using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Helpers;

namespace DataObject.Model
{
	[Serializable]
	public class ProviderDTO : DTOBase
	{
        public ProviderDTO()
        {
            ProviderID = Helper.NewSeqGuid();
            ModifiedDate = DateTime.Now;
        }

		#region Reference property Members


		#endregion

		#region Collection Members

		private IList<ProviderContactDTO> _providerContactCollection = new List<ProviderContactDTO>();
		public IList<ProviderContactDTO> ProviderContactCollection
		{
			get
			{
				return _providerContactCollection;
			}
			set
			{
				if (_providerContactCollection != value)
				{
					_providerContactCollection = value;
					OnChanged();
				}
			}
		}
		private IList<ReservationServiceDTO> _reservationServiceCollection = new List<ReservationServiceDTO>();
		public IList<ReservationServiceDTO> ReservationServiceCollection
		{
			get
			{
				return _reservationServiceCollection;
			}
			set
			{
				if (_reservationServiceCollection != value)
				{
					_reservationServiceCollection = value;
					OnChanged();
				}
			}
		}
		private IList<RouteServiceDTO> _routeServiceCollection = new List<RouteServiceDTO>();
		public IList<RouteServiceDTO> RouteServiceCollection
		{
			get
			{
				return _routeServiceCollection;
			}
			set
			{
				if (_routeServiceCollection != value)
				{
					_routeServiceCollection = value;
					OnChanged();
				}
			}
		}
		private IList<ServiceProviderDTO> _serviceProviderCollection = new List<ServiceProviderDTO>();
		public IList<ServiceProviderDTO> ServiceProviderCollection
		{
			get
			{
				return _serviceProviderCollection;
			}
			set
			{
				if (_serviceProviderCollection != value)
				{
					_serviceProviderCollection = value;
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Active

		private bool _active;

		/// <summary>
		///  Property Active
		/// <summary>
		public bool Active
		{
			get
			{
				return _active;
			}

			set
			{
				if (_active != value)
				{
					this.OnActiveChanging(value);
					_active = value;
					this.OnActiveChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property AddressLine1

		private string _addressLine1;

		/// <summary>
		///  Property AddressLine1
		/// <summary>
		public string AddressLine1
		{
			get
			{
				return _addressLine1;
			}

			set
			{
				if (_addressLine1 != value)
				{
					this.OnAddressLine1Changing(value);
					_addressLine1 = value;
					this.OnAddressLine1Changed();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property AddressLine2

		private string _addressLine2;

		/// <summary>
		///  Property AddressLine2
		/// <summary>
		public string AddressLine2
		{
			get
			{
				return _addressLine2;
			}

			set
			{
				if (_addressLine2 != value)
				{
					this.OnAddressLine2Changing(value);
					_addressLine2 = value;
					this.OnAddressLine2Changed();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property City

		private string _city;

		/// <summary>
		///  Property City
		/// <summary>
		public string City
		{
			get
			{
				return _city;
			}
			set
			{
				if (_city != value)
				{
					this.OnCityChanging(value);
					_city = value;
					this.OnCityChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property CountryID

		private int _countryID;

		/// <summary>
		///  Property CountryID
		/// <summary>
		public int CountryID
		{
			get
			{
				return _countryID;
			}

			set
			{
				if (_countryID != value)
				{
					this.OnCountryIDChanging(value);
					_countryID = value;
					this.OnCountryIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Description

		private string _description;

		/// <summary>
		///  Property Description
		/// <summary>
		public string Description
		{
			get
			{
				return _description;
			}

			set
			{
				if (_description != value)
				{
					this.OnDescriptionChanging(value);
					_description = value;
					this.OnDescriptionChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Email

		private string _email;

		/// <summary>
		///  Property Email
		/// <summary>
		public string Email
		{
			get
			{
				return _email;
			}

			set
			{
				if (_email != value)
				{
					this.OnEmailChanging(value);
					_email = value;
					this.OnEmailChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property FaxNumber

		private string _faxNumber;

		/// <summary>
		///  Property FaxNumber
		/// <summary>
        public string FaxNumber
		{
			get
			{
                return _faxNumber;
			}

			set
			{
                if (_faxNumber != value)
				{
					this.OnFaxNumberChanging(value);
                    _faxNumber = value;
                    this.OnFaxNumberChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedBy

		private string _modifiedBy;

		/// <summary>
		///  Property ModifiedBy
		/// <summary>
		public string ModifiedBy
		{
			get
			{
				return _modifiedBy;
			}

			set
			{
				if (_modifiedBy != value)
				{
					this.OnModifiedByChanging(value);
					_modifiedBy = value;
					this.OnModifiedByChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedDate

		private DateTime? _modifiedDate;

		/// <summary>
		///  Property ModifiedDate
		/// <summary>
		public DateTime? ModifiedDate
		{
			get
			{
				return _modifiedDate;
			}

			set
			{
				if (_modifiedDate != value)
				{
					this.OnModifiedDateChanging(value);
					_modifiedDate = value;
					this.OnModifiedDateChanged();
				}
			}
		}

		#endregion

		#region Property PostalCode

		private string _postalCode;

		/// <summary>
		///  Property PostalCode
		/// <summary>
		public string PostalCode
		{
			get
			{
				return _postalCode;
			}

			set
			{
				if (_postalCode != value)
				{
					this.OnPostalCodeChanging(value);
					_postalCode = value;
					this.OnPostalCodeChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ProviderID

		private Guid _providerID;

		/// <summary>
		///  Property ProviderID
		/// <summary>
		public Guid ProviderID
		{
			get
			{
				return _providerID;
			}

			set
			{
				if (_providerID != value)
				{
					this.OnProviderIDChanging(value);
					_providerID = value;
					this.OnProviderIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ProviderName

		private string _providerName;

		/// <summary>
		///  Property ProviderName
		/// <summary>
		public string ProviderName
		{
			get
			{
				return _providerName;
			}

			set
			{
				if (_providerName != value)
				{
					this.OnProviderNameChanging(value);
					_providerName = value;
					this.OnProviderNameChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ProviderNumber

		private string _providerNumber;

		/// <summary>
		///  Property ProviderNumber
		/// <summary>
		public string ProviderNumber
		{
			get
			{
				return _providerNumber;
			}

			set
			{
				if (_providerNumber != value)
				{
					this.OnProviderNumberChanging(value);
					_providerNumber = value;
					this.OnProviderNumberChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Phone

		private string _phone;

		/// <summary>
        ///  Property Phone
		/// <summary>
        public string Phone
		{
			get
			{
                return _phone;
			}

			set
			{
                if (_phone != value)
				{
					this.OnPhoneChanging(value);
                    _phone = value;
					this.OnPhoneChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Website

		private string _website;

		/// <summary>
		///  Property Website
		/// <summary>
		public string Website
		{
			get
			{
				return _website;
			}

			set
			{
				if (_website != value)
				{
					this.OnWebsiteChanging(value);
					_website = value;
					this.OnWebsiteChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Extensibility Method Declarations

		protected virtual void OnActiveChanging(bool active) { }
		protected virtual void OnActiveChanged() { }
		protected virtual void OnAddressLine1Changing(string addressLine1) { }
		protected virtual void OnAddressLine1Changed() { }
		protected virtual void OnAddressLine2Changing(string addressLine2) { }
		protected virtual void OnAddressLine2Changed() { }
		protected virtual void OnCityChanging(string city) { }
		protected virtual void OnCityChanged() { }
		protected virtual void OnCountryIDChanging(int countryID) { }
		protected virtual void OnCountryIDChanged() { }
		protected virtual void OnDescriptionChanging(string description) { }
		protected virtual void OnDescriptionChanged() { }
		protected virtual void OnEmailChanging(string email) { }
		protected virtual void OnEmailChanged() { }
        protected virtual void OnFaxNumberChanging(string fax) { }
		protected virtual void OnFaxNumberChanged() { }
		protected virtual void OnModifiedByChanging(string modifiedBy) { }
		protected virtual void OnModifiedByChanged() { }
		protected virtual void OnModifiedDateChanging(DateTime? modifiedDate) { }
		protected virtual void OnModifiedDateChanged() { }
		protected virtual void OnPostalCodeChanging(string postalCode) { }
		protected virtual void OnPostalCodeChanged() { }
		protected virtual void OnProviderIDChanging(Guid providerID) { }
		protected virtual void OnProviderIDChanged() { }
		protected virtual void OnProviderNameChanging(string providerName) { }
		protected virtual void OnProviderNameChanged() { }
		protected virtual void OnProviderNumberChanging(string providerNumber) { }
		protected virtual void OnProviderNumberChanged() { }
		protected virtual void OnPhoneChanging(string telephone) { }
		protected virtual void OnPhoneChanged() { }
		protected virtual void OnWebsiteChanging(string website) { }
		protected virtual void OnWebsiteChanged() { }

		#endregion

	}
}
